package com.rjgc.title.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.rjgc.title.mapper.AutobiographyMapper;
import com.rjgc.title.model.entity.apply.Autobiography;
import com.rjgc.title.service.AutobiographyService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 个人自传 服务实现类
 * </p>
 *
 * @author 卓抱抱
 * @since 2022-04-26
 */
@Service
public class AutobiographyServiceImpl extends ServiceImpl<AutobiographyMapper, Autobiography> implements AutobiographyService {

    @Autowired
    private AutobiographyMapper autobiographyMapper;

    @Override
    public Autobiography getAll(String userId) {

        QueryWrapper<Autobiography> queryWrapper = new QueryWrapper<>();

        queryWrapper.eq("userId",userId);

        Autobiography autobiography = autobiographyMapper.selectOne(queryWrapper);
        return autobiography;
    }
}
